package com.campus.service;

import com.campus.entity.Course;
import com.campus.mapper.CourseMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDate;

@Service
public class CourseServiceImpl implements CourseService {
    @Autowired
    public CourseMapper courseMapper;
    @Override
    public void insertCourse(Course course){
        course.setCreatedTime(LocalDate.now());
        courseMapper.insert(course);
    }
}
